<?php

namespace bc\util;

use yii;

class Redis extends \Redis
{
	public function __construct($name = 'redis')
	{
		$config = Yii::$app->get ( $name );
		$this->connect ( $config ['hostname'], $config ['port'] );
		$this->select ( $config ['database'] );
		if ($config ['auth'])
			$this->auth ( $config ['auth'] );
	}
}